{include file="header.tpl.php"}


<div class="titleFull">

	<div class="wrapper">

		<h1 style="line-height: 100px; margin: 0px;">Messages</h1>

	</div>

</div>


<div class="titleBlueBar"></div>




<div class="content2">

	<div class="wrapper">

		<div class="h30"></div>

		<div class="boxLeft2">






			<div style="float: right;"><a class="buttonsmall" href="sendmessage.php">New Message</a></div>


			<div class="h20"></div>

			<form action="messages.php"  method="post" id="form1">
			<table cellspacing="0" class="table" cellpadding="0">

			  <tr class="listing_th_row">
				 <th>&nbsp;&nbsp;<input type="checkbox" id="checkAll" onclick="CheckAll('form1')" />&nbsp;</th><th>Sender</th> <th>Subject</th><th>Date</th>
			  </tr>

				  {foreach item=message from=$messages}
				  
				  <tr class="listing_row"><td style="width:30px; text-align:center"><input type="checkbox" name="msgid[]" value="{$message.msgid}" onclick="uncheckCheckAllbox(this)" /></td><td style="width:20%">&nbsp;{$message.sender}</td><td style="width:60%">&nbsp;{if $message.read eq "0"}<b><a href="message.php?msgid={$message.msgid}">{$message.subject}</a></b>{else}<a href="message.php?msgid={$message.msgid}">&nbsp;{$message.subject}</a>{/if}</td><td>{$message.date}</td></tr>
				  
				  {/foreach}
				  
				 

			 </table>


			 {if $messages ne ""}
			<div style="clear:both; margin-left:8px; padding-top:10px; padding-bottom:10px;">
			<input type="hidden" name="action" value="delete" />
			<input type="submit" class="buttonsmall" name="deletebtn" value="Delete" onclick="if(!confirm('Are you sure you want to delete selected messages?')) return false;" />
			</div>
			{/if}
			 </form>


			 {if $pages gt 1}
			 <div class="clear" style="width:660px; margin:0px auto; " >
			 <div style="float:left" class="listing_paging">Page {$page} of {$pages}</div> <div style="float:right" class="listing_paging"> {$previous} {$next}</div>
			 </div>
			{/if}
			  


			{literal}
			<script type="text/javascript">
			$(document).ready(function(){

			$('.listing_row').hover(function(){ $(this).css('background-color', '#f6f6f6'); }, function(){ $(this).css('background-color', '#ffffff'); });


			});
			</script>
			{/literal}





	</div>



<!--Right Panel-->
{include file="sidebar.tpl.php"}
<!--End Right Panel-->


{include file="footer.tpl.php"}